package funcation;

public class Demo06 {
  public static void main(String args[]){
	    double result = jiecheng(3);
	    System.out.println(result);
  }
  
  public static double jiecheng(int num){
      double result = 1.0;
      for(int i=1;i<=num;i++){
         result*=i;
      }
      return result;
   }
     
 
}
